#include <ir/block.h>

namespace ir {
  Block::Block(int index) {
    this->name = std::string(".B") + std::to_string(index);
  }

  Block::~Block() {
    vector_clear_pointer(this->reg_list);
    vector_clear_pointer(this->inst_list);
  }

  void Block::accept(riscv::Visitor & visitor) {
    visitor.visit(*this);
  }

  std::string Block::get_name() {
    return this->name;
  }
}
